## Description #############################################################################
#
# Tests related to showing EOP.
#
############################################################################################

# == File: ./src/eop/show.jl ===============================================================

# -- Function: show ------------------------------------------------------------------------

@testset "Show" begin
    # == EOP for IAU-76 / FK5 theory =======================================================

    eop_iau1980 = read_iers_eop("../eop_IAU1980.txt")

    expected = """
    EopIau1980:
         Data │ Timespan
     ─────────┼──────────────────────────────────────────────
            x │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
            y │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
      UT1-UTC │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
          LOD │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
          δΔψ │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
          δΔϵ │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00"""

    result = sprint(show, MIME("text/plain"), eop_iau1980)
    @test result == expected

    expected = "EopIau1980"
    result = sprint(print, eop_iau1980)

    # == EOP for IAU-2006 / 2010A theory ===================================================

    eop_iau2000a = read_iers_eop("../eop_IAU2000A.txt", Val(:IAU2000A))

    expected = """
    EopIau2000A:
         Data │ Timespan
     ─────────┼──────────────────────────────────────────────
            x │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
            y │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
      UT1-UTC │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
          LOD │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
           δx │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00
           δy │ 2004-04-01T00:00:00 -- 2004-04-30T00:00:00"""

    result = sprint(show, MIME("text/plain"), eop_iau2000a)
    @test result == expected

    expected = "EopIau2000A"
    result = sprint(print, eop_iau2000a)
end
